package com.ikun.yummy.activitys.main.fragment.me;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class MeViewModel extends ViewModel {
    private MutableLiveData<String> username;
    private MutableLiveData<String> img;

    //监听并更新数据
    public MeViewModel() {
        username = new MutableLiveData<>();
        username.setValue("点击登录");
        img = new MutableLiveData<>();
        img.setValue("");
    }
    public LiveData<String> getUserName() {
        return username;
    }
    public void setUsername(String username) {
        this.username.setValue(username);
    }

    public MutableLiveData<String> getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img.setValue(img);
    }
}